<?php
class News
{
	public function construct()
	{
		
	}
	
	public function index()
	{
		CommonFunc::loadFile(SMARTYLIBS . "Smarty.class.php");
		$smarty = new Smarty();
		
		$smarty->assign('lang', $lang);
		$smarty->display(SITETPL . 'product/index.tpl');
	}
	
	public function viewDetails()
	{
		CommonFunc::loadFile(SMARTYLIBS . "Smarty.class.php");
		CommonFunc::loadFile("model/News.php");
		//CommonFunc::loadFile(ADAPTOR . "/Translate.php");
		$smarty = new Smarty();
		$modNews = new FrontNews();
		$lang = $_SESSION['lang'];
		$translateHelper = new TranslateHelper();
		$smarty->assign('objTranslate', $translateHelper);
		$request = CommonFunc::getRequest();
		$news_id = $request['id'];
		$news_arr = $modNews->getNewsById($news_id);
		$smarty->assign("news_arr", $news_arr);
		$smarty->assign('lang', $lang);
		$smarty->display(SITETPL . 'news/details.tpl');
	}
}	
?>